package net.hn.hnms.biz.video.domain;


import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "监控点树结构信息")
public class CameraTree {

    private String name;

    private String code;

    private String regionPathName;

    private List<CameraTree> children = new ArrayList<>();

    public void addChild(CameraTree child) {
        this.children.add(child);
    }

    public void addChild(List<CameraTree> childs) {
        this.children.addAll(childs);
    }

    public CameraTree(String name,  String regionPathName) {
        this.name = name;
        this.regionPathName = regionPathName;
    }

    public CameraTree(String name, String code, String regionPathName) {
        this.name = name;
        this.code = code;
        this.regionPathName = regionPathName;
    }

}
